package schoolWork.work05.test3;

import javax.swing.*;

public class MyJFrame extends JFrame {
    JLabel jl1 = new JLabel("学生注册查询");
    JLabel jl2 = new JLabel("学号");
    JLabel jl3 = new JLabel("姓名");
    JLabel jl4 = new JLabel("系别");
    JLabel jl5 = new JLabel("专业");
    JLabel jl6 = new JLabel("地址");

    JTextField jTextField1 = new JTextField();
    JTextField jTextField2 = new JTextField();
    JTextField jTextField3 = new JTextField();
    JTextField jTextField4 = new JTextField();
    JTextField jTextField5 = new JTextField();

    JButton btn1 = new JButton("增加");
    JButton btn2 = new JButton("查询");
    JButton btn3 = new JButton("取消");

    public MyJFrame(){
        this.setLayout(null);

        this.add(jl1);
        jl1.setBounds(250,50,150,30);

        this.add(jl2);
        jl2.setBounds(50,100,50,30);
        this.add(jTextField1);
        jTextField1.setBounds(100,100,150,30);

        this.add(jl3);
        jl3.setBounds(300,100,50,30);
        this.add(jTextField2);
        jTextField2.setBounds(350,100,150,30);

        this.add(jl4);
        jl4.setBounds(50,150,50,30);
        this.add(jTextField3);
        jTextField3.setBounds(100,150,150,30);

        this.add(jl5);
        jl5.setBounds(300,150,50,30);
        this.add(jTextField4);
        jTextField4.setBounds(350,150,150,30);

        this.add(jl6);
        jl6.setBounds(50,200,50,30);
        this.add(jTextField5);
        jTextField5.setBounds(100,200,400,30);

        this.add(btn1);
        btn1.setBounds(100,250,100,30);
        this.add(btn2);
        btn2.setBounds(250,250,100,30);
        this.add(btn3);
        btn3.setBounds(400,250,100,30);

        this.setBounds(550,300,600,500);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setVisible(true);
    }
}
